<?php echo $this->css('css/events.css'); ?>

<div class="cms-form-message">
    Fill in the fields below to add a events article to the site
</div>
<form action="<?php echo $this->url(array('action' => 'add')); ?>" method="post" name="EventAddForm" id="EventAddForm">
    <table align="center" cellpadding="6" cellspacing="0">
        <tr >
            <td align="right" nowrap="nowrap" class="sectionTitle1">Event Category:</td>
            <td>
                <select name="EventCategory">
                    <option value="">Select Event Category</option>
                    <?php
                    foreach($categories as $category) { ?>
                    <option value="<?php echo $category->getId(); ?>"><?php echo $category->getCategoryName(); ?></option>
                    <?php }  ?>
                </select>
            </td>
        </tr>
        <tr >
            <td align="right" nowrap="nowrap" class="sectionTitle1">
            Event Title:
            </td>
            <td>
                <input type="text" id="EventName" name="EventName" value="" size="60" />
            </td>
        </tr>
        <tr >
            <td align="right" class="sectionTitle1">
            Title Alias:
            </td>
            <td colspan="2">
                <label for="FriendlyURL"></label>
                <input name="FriendlyURL" type="text" class="alias" id="FriendlyURL" style="width: 92%;" size="65" readonly="readonly" />
            </td>
        </tr>
        <tr >
            <td align="right" valign="top" nowrap="nowrap" class="sectionTitle1">Description:</td>
            <td>
                <textarea id="EventDesc" name="EventDesc" cols="70" rows="25"></textarea>
            </td>
        </tr>
        <tr >
            <td align="right" nowrap="nowrap" class="sectionTitle1">Time:</td>
            <td>
                <input type="text" name="Time" value="" size="18" />
            </td>
        </tr>
        <tr >
            <td align="right" valign="top" nowrap="nowrap" class="sectionTitle1">Date:</td>
            <td>
                <div class="checkDiv" id="singleDaySel">
                    <input name="EventDuration" type="radio" id="singleCheck" onclick="showDateArea('#single')" value="single" checked="checked" />
                    <label for="EventDuration">Single Day Event</label>
                </div>
                <div class="dateDiv" id="single" style="display:block; height: 30px;">
                    <input name="Date" type="text" id="Date" value="0000-00-00" size="12" />
                </div>
                <div class="checkDiv" id="periodSel">
                    <input type="radio" name="EventDuration" id="periodCheck" value="period" onclick="showDateArea('#period')" />
                    <label for="EventDuration">Period Event</label>
                </div>
                <div class="dateDiv" id="period" style="display:none; height: 30px;">
                    <table width="361" border="0" cellpadding="2" cellspacing="0">
                        <tr>
                            <td width="39">From:</td>
                            <td width="139">
                                <input name="StartDate" id="StartDate" size="12" value="0000-00-00" />
                            </td>
                            <td width="23">To: </td>
                            <td width="144">
                                <input name="EndDate" id="EndDate" size="12" value="0000-00-00" />
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr >
            <td align="right" nowrap="nowrap" class="sectionTitle1">Venue:</td>
            <td>
                <input type="text" name="Venue" value="" size="50" />
            </td>
        </tr>
        <tr >
            <td nowrap="nowrap" align="right">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr >
            <td colspan="2" align="center" nowrap="nowrap">
                <input type="submit" class="sectionTitle1" value="Add Event" />
                <input name="button" type="button" class="sectionTitle1" id="button" onclick="if( confirm('Cancel Addition Event Information?') ) location.href = '<?php echo $this->url(array('module' => 'events')); ?>'; " value="Cancel Update" />
            </td>
        </tr>
    </table>
    <input type="hidden" name="AssocImage" value="" />
    <input type="hidden" name="MM_insert" value="form1" />
</form>


<script type="text/javascript" src="scripts/friendurl/jquery.friendurl.min.js"></script>
<script type="text/javascript" src="scripts/tiny_mce/tiny_mce.js"></script>
<?php echo $this->script('js/events.js'); ?>